package com.sskj.api.vo.srs;

import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

@Schema(description = "系统信息")
@Data
public class SummariesSystemInfo {

    @Schema(description = "CPU 使用率")
    @JsonProperty("cpu_percent")
    private Float cpuPercent;

    @Schema(description = "磁盘每秒读取量")
    @JsonProperty("disk_read_KBps")
    private Integer diskReadKBps;

    @Schema(description = "磁盘每秒写入量")
    @JsonProperty("disk_write_KBps")
    private Integer diskWriteKBps;

    @Schema(description = "磁盘忙碌百分比")
    @JsonProperty("disk_busy_percent")
    private Float diskBusyPercent;

    @Schema(description = "物理内存总量")
    @JsonProperty("mem_ram_kbyte")
    private Long memRamKbyte;

    @Schema(description = "已用物理内存占比")
    @JsonProperty("mem_ram_percent")
    private Float memRamPercent;

    @Schema(description = "Swap分区大小")
    @JsonProperty("mem_swap_kbyte")
    private Long memSwapKbyte;

    @Schema(description = "Swap使用率")
    @JsonProperty("mem_swap_percent")
    private Float memSwapPercent;

    @Schema(description = "总核心数")
    @JsonProperty("cpus")
    private Integer cpus;

    @Schema(description = "在线的核心数")
    @JsonProperty("cpus_online")
    private Integer cpusOnline;

    @Schema(description = "系统已运行时间(秒)")
    @JsonProperty("uptime")
    private Double uptime; // 原为 Float，但 JSON 是浮点数如 23661.77，建议用 Double 更精确

    @Schema(description = "CPU空闲时间累计")
    @JsonProperty("ilde_time")
    private Double ildeTime; // 同上，保留小数，用 Double

    @Schema(description = "过去1分钟系统平均负载")
    @JsonProperty("load_1m")
    private Float load1m;

    @Schema(description = "过去5分钟系统平均负载")
    @JsonProperty("load_5m")
    private Float load5m;

    @Schema(description = "过去1分钟系统平均负载")
    @JsonProperty("load_15m")
    private Float load15m;

    @Schema(description = "网络采样时间戳(毫秒)")
    @JsonProperty("net_sample_time")
    private Long netSampleTime; // 时间戳可能超 Integer 范围，必须用 Long

    @Schema(description = "接收的总网络字节数")
    @JsonProperty("net_recv_bytes")
    private Long netRecvBytes;

    @Schema(description = "发送的总网络字节数")
    @JsonProperty("net_send_bytes")
    private Long netSendBytes;

    @Schema(description = "网络接口接收到的总字节数")
    @JsonProperty("net_recvi_bytes")
    private Long netRecviBytes;

    @Schema(description = "网络接口发送的总字节数")
    @JsonProperty("net_sendi_bytes")
    private Long netSendiBytes;

    @Schema(description = "流量采样时间(毫秒)")
    @JsonProperty("srs_sample_time")
    private Long srsSampleTime; // 同样是时间戳，用 Long

    @Schema(description = "音视频流接收总字节数")
    @JsonProperty("srs_recv_bytes")
    private Long srsRecvBytes;

    @Schema(description = "音视频流发送总字节数")
    @JsonProperty("srs_send_bytes")
    private Long srsSendBytes;

    @Schema(description = "TCP连接总数")
    @JsonProperty("conn_sys")
    private Integer connSys;

    @Schema(description = "ESTABLISHED连接数")
    @JsonProperty("conn_sys_et")
    private Integer connSysEt;

    @Schema(description = "TIME_WAIT连接数")
    @JsonProperty("conn_sys_tw")
    private Integer connSysTw;

    @Schema(description = "UDP连接数")
    @JsonProperty("conn_sys_udp")
    private Integer connSysUdp;

    @Schema(description = "有效连接数")
    @JsonProperty("conn_srs")
    private Integer connSrs;
}
